<%@ include file="/common/taglibs.jsp"%>
<%@ page language="java" pageEncoding="utf8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
		<title></title>
		<link rel="stylesheet"
			href="<c:url value="/css/adminsinglepage.css"/>" type="text/css" />
		<link rel="stylesheet"
			href="<c:url value='/scripts/themes/base/jquery.ui.all.css'/>"
			type="text/css" />
	</head>
	<body class="single-page">

		<div id="single-page-tbar">
			<h1>
				<img src="<c:url value="/images/transparent.gif"/>"
					class="imgbundle"
					style="width: 16px; height: 16px; background-position: 0pt -2235px;">
					<strong>订单[${orders.orderId }]退款...操作 
			</h1>

			<ul class="btn-bar">
				<li>
					<button type="button" class="btn btn-quit">
						<span><span>关 闭</span> </span>
					</button>
				</li>
			</ul>
		</div>


		<div class="mainwrap" id="main">
			<div class="spage-main-box">
				<form id="model_form" action="od_refund_save.html" method="post"
					class="tableform">
					<input type="hidden" value="${orders.orderId }"
						name="orderRefunds.orderId" />
					<input type="hidden" value="${orders.memberId}"
						name="orderRefunds.memberId" />
					<div class="division">
						<table width="100%" cellspacing="0" cellpadding="0" border="0">
							<!--<tr> <th>收取支付费用:</th> <td></td> <th>是否开票:</th> <td>否</td> </tr> <tr> <th>税金:</th> <td>0.000</td> <th>发票抬头:</th> <td></td> </tr> -->
							<tbody>
								<tr>
									<th>
										订单号:
									</th>
									<td>
										${orders.orderId} 【${orders.payStatus}】
									</td>
									<th>
										下单日期:
									</th>
									<td>
										${orders.createTimeString}
									</td>
								</tr>
								<tr>
									<th>
										订单金额:
									</th>
									<td>
										<fmt:message key="common_currency" />${orders.totalAmount}
									</td>
									<th>
										已付金额:
									</th>
									<td>
										<fmt:message key="common_currency" />${orders.payed}
									</td>
								</tr>
								<tr>
									<th>
										退款类型:
									</th>
									<td>
										<input type="radio" value="1" name="orderRefunds.payType" />
										<label>
											在线支付
										</label> 
										<input type="radio" checked="checked" value="2"
											name="orderRefunds.payType" />
										<label>
											线下支付
										</label>
										<br />
									</td>
									<th>
										退款方式:
									</th>
									<td>

										<select class="x-input-select  inputstyle"
											name="orderRefunds.paymentTypeId"  onchange="getSelectText(this)"
											id="orderRefunds_paymentTypeId">
											<c:forEach var="cfg" items="${orderPaymentCfgs}"
												varStatus="index">
												<option value="${cfg.pcId }">
													${cfg.customName}
												</option>
											</c:forEach>
										</select>
										<input  name="orderRefunds.paymentTypeName" type="hidden" id="orderRefunds_paymentTypeName" />
									</td>
								</tr>

								<tr>
									<th>
										退款银行:
									</th>
									<td colspan="3">
										<input name="orderRefunds.bank" id="payBank" class="x-input " />
										<select name="select_account" id="selectAccount"
											class="x-input-select  inputstyle">
											<option value="0" selected="selected">
												--使用已存在帐户--
											</option>
											<option value="招商银行-2222555522225555" selected="selected">
												招商银行 - 2222555522225555
											</option>
											<option value="-" selected="selected">
												-
											</option>
											<option value="CMCC-1111111111111" selected="selected">
												CMCC - 1111111111111
											</option>
										</select>
									</td>
								</tr>
								<tr>
									<th>
										退款帐号:
									</th>
									<td>
										<input id="payAccount" name="orderRefunds.account"
											class="x-input " />
									</td>
									<th>
										收款人:
									</th>
									<td>
										<input type="text" value="${member.name}"
											name="orderRefunds.payAccount" class="x-input " />
									</td>
								</tr>
								<tr>
									<th>
										退款金额:
									</th>
									<td>
										<input value="${orders.payed}" name="orderRefunds.money"
											class="x-input " />
									</td>
									<th>
										&nbsp;
									</th>
									<td>
										&nbsp;
									</td>
								</tr>
								<tr>
									<th>
										退款单备注：
									</th>
									<td colspan="3">
										<textarea value="" rows="" cols="40" name="orderRefunds.description"></textarea>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="table-action">
						<button class="btn" type="submit">
							<span><span>提交</span> </span>
						</button>
					</div>
				</form>
			</div>



		</div>

		<div class="footBar" id="footBar">
		</div>


		<script type="text/javascript"
			src="<c:url value='/scripts/jquery-1.4.2.js'/>"></script>

		<script type="text/javascript">
	function autoHeightAndWeight() {
		$("#main").height($("body").height() - $("#single-page-tbar").height());

	}

	autoHeightAndWeight();

	$('#orderRefunds_paymentTypeId').val('${orders.paymentTypeId}');
	$("#orderRefunds_paymentTypeName").attr("value",$('#orderRefunds_paymentTypeId  option:selected').text().trim());
	function getSelectText(obj){
		$("#orderRefunds_paymentTypeName").attr("value",$(obj).find('option:selected').text().trim());
	
	}
</script>

	</body>
</html>